/**
 * Copyright (c) 2006 Amgad S Youssef
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipsejcde.jcwde.options;

import java.util.ArrayList;

import org.eclipsejcde.core.preferences.JCPreferences;

/**
 * @author Amgad S Youssef
 *
 */
public class OptionsPreparer {
	public static String[] prepareJCWDEOptions() {
		ArrayList optionsList = new ArrayList();
		optionsList.add("-p " + JCPreferences.getJCWDE_CL_OPTIONS_p());
		if (JCPreferences.isJCWDE_CL_OPTIONS_nobanner()) {
			optionsList.add("-nobanner");
		}
		if (JCPreferences.isJCWDE_CL_OPTIONS_verbose()) {
			optionsList.add("-verbose");
		}

		String[] options = new String[optionsList.size()];
		optionsList.toArray(options);
		return options;
	}

}
